# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header

inherit ruby

IUSE=""
USE_RUBY="any"

DESCRIPTION="Lexical Scanner Generator (lex for ruby)."
HOMEPAGE="http://homepage1.nifty.com/arima/ruby/"
SRC_URI="http://homepage1.nifty.com/arima/ruby/${P/_/}.tar.gz"
S=${WORKDIR}/${PN}
KEYWORDS="ia64 ~ppc ppc64 x86 amd64"
LICENSE="LGPL-2.1"
SLOT="0"

DEPEND="virtual/ruby"

src_compile() {
	ruby setup.rb config || die "setup.rb config failed"
	ruby setup.rb setup || die "setup.rb setup failed"
}

src_install() {
	ruby setup.rb config --prefix=${D}/usr || die "setup.rb config failed"
	ruby setup.rb install || die "setup.rb install failed"
	dodoc COPYING ChangeLog README* example.rb templates/*
}
